// Setting the data as Panel 
xtset country_id year

// Descriptive Statistics
sum fatalities sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war if e(sample)==1

// Model 1 in Table 2
xtnbreg fatalities sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, re exposure(year)

// Model 2 in Table 2
menbreg fatalities sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, exposure(year) || country_id: R.sanctions_decay

// Model 3 in Table 2
xtlogit success_rate sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, re

// Lag Variables
gen lag_fatalities = (fatalities > L.fatalities) if L.fatalities < .
gen lag_success_rate = (success_rate > L.success_rate) if L.success_rate < .

// Fatalities Lagged Variable
xtnbreg lag_fatalities sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, re exposure(year)

xtdpdsys lag_fatalities sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, lags(1) artests(2)

// Success Rate Lagged Variable
xtlogit lag_success_rate sanctions_decay gd_ptsa wdi_pop mad_gdppc fh_ipolity2 COW_civil_war, re
